//
//  GRDatePickerView.h
//  BaseProject
//
//  Created by karong on 2023/7/21.
//

#import "BasePickerView.h"

NS_ASSUME_NONNULL_BEGIN

@protocol  GRDatePickerViewDelegate<NSObject>   //定义一个代理。
//此方法目的是得到当前选择器的选择结果
- (void)pickerDateView:(BasePickerView *)pickerDateView selectYear:(NSInteger)year selectMonth:(NSInteger)month selectDay:(NSInteger)day;

@end

@interface GRDatePickerView : BasePickerView


@property(nonatomic, weak)id <GRDatePickerViewDelegate>delegate ;

/** 选择的年 */
@property (nonatomic, assign)NSInteger selectYear;
/** 选择的月 */
@property (nonatomic, assign)NSInteger selectMonth;
/** 选择的日 */
@property (nonatomic, assign)NSInteger selectDay;
//现在的年月日
@property (nonatomic, assign)NSInteger currentYear;
@property (nonatomic, assign)NSInteger currentMonth;
@property (nonatomic, assign)NSInteger currentDay;
//默认年月日
@property (nonatomic, assign)NSInteger defaultYear;
@property (nonatomic, assign)NSInteger defaultMonth;
@property (nonatomic, assign)NSInteger defaultDay;

//显示的最低年
@property (nonatomic, assign)NSInteger minShowYear;

@property (nonatomic, assign)NSInteger yearSum;
///選擇年-月-日
- (void)setDefaultSelectDay:(NSString *)day dateFormat:(NSString *)dateFormat;
///選擇年-月
- (void)setDefaultSelectMonth:(NSString *)day dateFormat:(NSString *)dateFormat;
///選擇年
- (void)setDefaultSelectYear:(NSString *)day dateFormat:(NSString *)dateFormat;
@end

NS_ASSUME_NONNULL_END
